using System;
using System.Xml;  
using System.Configuration;
using System.Reflection;

namespace ProcessesSMS
{
	/// <summary>
	/// Summary description for Config.
	/// </summary>
	public class ConfigApp
	{
		public static int minThread;
		public static int maxThread;
		public static int ConcurrentLimit;
		public static string ConnStr;
		public static bool bLogMT = false;
		public static bool bLogMO = false;
	}
	
	//...

	public class ConfigSettings
	{
		private ConfigSettings() {}
		public static void LoadConfig()
		{
					
			ConfigApp.minThread=Convert.ToInt32(ReadSetting("minThread"));
			ConfigApp.maxThread=Convert.ToInt32(ReadSetting("maxThread"));
			ConfigApp.ConcurrentLimit=Convert.ToInt32(ReadSetting("ConcurrentLimit"));
			ConfigApp.ConnStr=ReadSetting("SMSConnStr");		
		}

		public static string ReadSetting(string key)
		{
			return ConfigurationSettings.AppSettings[key];
		}
	}
}
